package com.ihrm.common.controller;

import org.springframework.web.bind.annotation.ModelAttribute;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @auther chongxiongwei
 * @create 2020-04-16-9:51
 */
public class BaseController {
    protected HttpServletRequest request;
    protected HttpServletResponse response;
    protected String companyId;
    protected String companyName;

    @ModelAttribute   // 在执行控制器之前执行
    protected void setResOrReq(HttpServletRequest request,HttpServletResponse response){
        this.request =request;
        this.response =response;
        this.companyId = "1";
        this.companyName ="互联网独角兽";
    }
}
